package com.meilingcloud.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 标签模板 对象 sys_label_temp
 *
 * @author chenl
 * @date 2021-04-14
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_label_temp")
public class SysLabelTemp implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 标签模板ID
     */
    @TableId(value = "label_temp_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long labelTempId;

    /**
     * 标签类型ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long labelTypeId;

    /**
     * 标签模板名称
     */
    private String labelTempName;

    /**
     * 标签模板内容
     */
    private String labelTempContent;

    /**
     * 是否启用 0-不启用1-启用
     */
    private String active;

    /**
     * 删除标志
     */
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 标签类型编号
     */
    @TableField(exist = false)
    private String labelTypeCode;

    /**
     * 标签类型名称
     */
    @TableField(exist = false)
    private String labelTypeName;

    /**
     * 标签宽度
     */
    @TableField(exist = false)
    private BigDecimal labelWidth;

    /**
     * 标签高度
     */
    @TableField(exist = false)
    private BigDecimal labelHeight;

    /**
     * 纸张宽度
     */
    @TableField(exist = false)
    private BigDecimal labelPageWidth;

    /**
     * 纸张高度
     */
    @TableField(exist = false)
    private BigDecimal labelPageHeight;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
